class Octopus {
    readonly num:number = 9;
    constructor(readonly name:string){}
}

const a = new Octopus('hh')
a.name = "123" // 只读属性报错
a.num = // 使用等号的时候已经报错